package com.nut.spp.api.client;

import com.nut.spp.common.Result;
import com.nut.spp.entity.GoodsCompose;
import com.nut.spp.service.GoodsComposeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Slf4j
@RestController
@RequestMapping("/client/goodsCompose")
public class GoodsComposeController {

    @Autowired
    private GoodsComposeService goodsComposeService;

    @GetMapping(value = "/goodsId/{goodsId}")
    public Result<List<GoodsCompose>> selectByGoodsId(@PathVariable Integer goodsId) {
        return goodsComposeService.selectByGoodsId(goodsId);
    }

}